home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************************
- * Complete System Killer, A500-A4000 V1.3 / V3.0, ECS/AGA, by Phagex '93 *
- * Segment Version 1.0 *
- *****************************************************************************
- * Killsys returns with:- *
- * d0 = Processor Type (d0 = x : 680x0 = 0 to 4), *
- * d1 = Bit #0 set if AGA, Bit #1 Set if V39 GFX lib available. *
- * a0 = GFX Base (either V0 or V39) *
- * a1 = Vector Base Register (68010++) *
- *****************************************************************************
-
- Opt c-
- Section "Full System Killer",Code_C
-
- Start Bra.s KillSys
- Bra ReturnSys
-
- KillSys Bsr CheckSystem
- Move.l GFXBase(pc),a6
- Lea WBView(pc),a0
- Move.l 34(a6),(a0)
- Sub.l a1,a1
- Jsr -222(a6)
- Jsr -270(a6)
- Jsr -270(a6)
- Move.l 4.w,a6
- Jsr -132(a6)
- Lea $Dff000,a6
- Lea SaveRegs(pc),a0
- Move.w 2(a6),d0
- Or.w d0,(a0)+
- Move.w $1c(a6),d0
- Or.w d0,(a0)+
- Move.w #$7fff,d0
- Moveq #0,d1
- Move.w d0,$96(a6)
- Move.w d0,$9a(a6)
- Move.w d0,$9c(a6)
- Move.w d1,$1fc(a6)
- Move.w d1,$106(a6)
- Move.w #%10001,$10c(a6)
- Lea ProcStats(pc),a6
- Move.w (a6)+,d0
- Move.w (a6)+,d1
- Move.l (a6)+,a0
- Move.l (a6)+,a1
- Rts
-
- ReturnSys Lea $Dff000,a6
- Move.w #$7fff,d0
- Move.w d0,$96(a6)
- Move.w d0,$9a(a6)
- Move.w d0,$9c(a6)
- Lea SaveRegs(pc),a0
- Move.w (a0)+,$96(a6)
- Move.w (a0)+,$9a(a6)
- Move.l 4.w,a6
- Jsr -138(a6)
- Move.l GFXBase(pc),a6
- Move.l WBView(pc),a1
- Jsr -222(a6)
- Move.l 38(a6),$dff080
- Move.l a6,a1
- Move.l 4.w,a6
- Jsr -414(a6)
- Moveq #0,d0
- Rts
-
- CheckSystem Move.l $4.w,a6
- Sub.l a1,a1
- Btst #0,$129(a6)
- Beq GetVecBase
- Lea FetchVectorBase(pc),a5
- Jsr -$1e(a6)
- Bra GetVecBase
-
- FetchVectorBase Movec vbr,a1
- Rte
-
- GetVecBase Lea VBRBase(pc),a0
- Move.l a1,(a0)
- Lea ProcStats(pc),a1
- Move.l #0,(a1)
-
- cachetest Move.l $4.w,a6
- Btst #3,$129(a6)
- Bne Found040
- Btst #2,$129(a6)
- Bne Found030
- Btst #1,$129(a6)
- Bne Found020
- Btst #0,$129(a6)
- Bne Found010
- Bra CheckAGA
-
- Found040 Move.w #4,(a1)
- Move.l $4.w,a6
- Lea NoCaches040(pc),a5
- Jsr -$1e(a6)
- Bra CheckAGA
- Found030 Move.w #3,(a1)
- Bra Found020_030
- Found020 Move.w #2,(a1)
-
- Found020_030 Move.l $4.w,a6
- Lea NoCaches020_030(pc),a5
- Jsr -$1e(a6)
- Bra CheckAGA
- Found010 Move.w #1,(a1)
- Bra CheckAGA
-
- NoCaches040 Movec cacr,d0
- Bclr.l #31,d0
- Bclr.l #15,d0
- Movec d0,cacr
- Rte
- NoCaches020_030 Movec cacr,d0
- Bclr #8,d0
- Bclr #0,d0
- Movec d0,cacr
- Rte
-
- CheckAGA Move.w $Dff07c,d0
- Cmp.b #$f8,d0
- Bne NotAGA
-
- Lea VerStats(pc),a1
- Move.w #1,(a1)
-
- Moveq #39,d0
- Bsr GetGFXLib
- Tst.l d0
- Bne GotV39Lib
-
- NotAGA Moveq #0,d0
- Bsr GetGFXLib
- Tst.l d0
- Bne GotGFXBase
- Rts
-
- GotV39Lib Lea VerStats(pc),a1
- Or.w #2,(a1)
-
- GotGFXBase Lea GFXbase(pc),a0
- Move.l d0,(a0)
- Rts
-
- GetGFXLib Move.l $4.w,a6
- Lea GFXName(pc),a1
- Jsr -$228(a6)
- Rts
-
- GFXName Dc.b "graphics.library",0
- Even
-
- ProcStats Dc.w 0
- VerStats Dc.w 0
- GFXBase Dc.l 0
- VBRBase Dc.l 0
- SaveRegs Dc.l $8000c000,0
- WBView Dc.l 0
-
-